import java.util.ArrayList;

public class NodeState {
	
	Tower towerA;
	Tower towerB;
	Tower towerC;
	int x;
	int y;
	boolean state;	
	float heuristicValue;
	NodeState fatherPointer;
	ArrayList<NodeState> childrenArray;
		
	public NodeState(Tower tA, Tower tB, Tower tC) {
		towerA=new Tower(tA.name);
		for (int i = 0; i < tA.getSize(); i++) {
			towerA.push(tA.getElement(i));
		}
		
		towerB=new Tower(tB.name);
		for (int i = 0; i < tB.getSize(); i++) {
			towerB.push(tB.getElement(i));
		}
		towerC=new Tower(tC.name);
		for (int i = 0; i < tC.getSize(); i++) {
			towerC.push(tC.getElement(i));
		}
		state=false;
		fatherPointer=null;
		childrenArray=new ArrayList<NodeState>();
		x=0;
		y=0;
	}
	
	public void setHeuristicValue(float hv){
		heuristicValue=hv;
	}
	
	public String toStringTowers(){
		String cad="";
		cad+="Torre A: "+towerA.toString()+"\n";
		cad+="Torre B: "+towerB.toString()+"\n";
		cad+="Torre C: "+towerC.toString()+"\n";
		return cad;
	}
	
	public void addCoordenada(int x,int y){
		this.x = x;
		this.y = y;
	}
}
